package com.edgclub.edg.api.param;

import android.text.TextUtils;

import com.edgclub.edg.api.ApiConfig;
import com.edgclub.edg.http.param.Params;
import com.edgclub.edg.utils.util.CryptUtil;

import java.util.TreeMap;

/**
 * 修改好友关系
 * 
 *
 */
public class MessageParam extends Params {

	private String fromUserId;

	private String toUserId;

	private String fromUserImid;

	private String toUserImid;
	
	private String state;
	
	private String nick;
	private String userId;
	private String page;
	private String pageSize;
	private String groupid;
	private String imids;
	private String gimid;
	private String target;
	private String alias;
	private String username;
	private String isOwner;

	@Override
	public TreeMap<String, String> getParams() {
		params = simpleParams();
		if (null != alias && !TextUtils.isEmpty(alias)) {
			params.put("alias", alias);
		}
		if (null != target && !TextUtils.isEmpty(target)) {
			params.put("target", target);
		}
		if (null != gimid && !TextUtils.isEmpty(gimid)) {
			params.put("gimid", gimid);
		}
		if (null != imids && !TextUtils.isEmpty(imids)) {
			params.put("imids", imids);
		}
		if (null != groupid && !TextUtils.isEmpty(groupid)) {
			params.put("groupid", groupid);
		}
		if (null != page && !TextUtils.isEmpty(page)) {
			params.put("page", page);
		}
		if (null != pageSize && !TextUtils.isEmpty(pageSize)) {
			params.put("pageSize", pageSize);
		}
		if (null != userId && !TextUtils.isEmpty(userId)) {
			params.put("userId", userId);
		}
		if (null != fromUserId && !TextUtils.isEmpty(fromUserId)) {
			params.put("fromUserId", fromUserId);
		}
		if (null != toUserId && !TextUtils.isEmpty(toUserId)) {
			params.put("toUserId", toUserId);
		}

		if (null != fromUserImid && !TextUtils.isEmpty(fromUserImid)) {
			params.put("fromUserImid", fromUserImid);
		}

		if (null != toUserImid && !TextUtils.isEmpty(toUserImid)) {
			params.put("toUserImid", toUserImid);
		}
		
		if (null != state && !TextUtils.isEmpty(state)) {
			params.put("state", state);
		}
		
		if (null != nick && !TextUtils.isEmpty(nick)) {
			params.put("nick", nick);
		}

		if (null != username && !TextUtils.isEmpty(username)) {
			params.put("username", username);
		}

		if (null != isOwner && !TextUtils.isEmpty(isOwner)) {
			params.put("isOwner", isOwner);
		}

		params.put(
				"sign",
				CryptUtil.sign(params, ApiConfig.HTTP_KEY));
		return params;
	}

	public String getAlias() {
		return alias;
	}

	public void setAlias(String alias) {
		this.alias = alias;
	}

	public String getTarget() {
		return target;
	}

	public void setTarget(String target) {
		this.target = target;
	}

	public String getGimid() {
		return gimid;
	}

	public void setGimid(String gimid) {
		this.gimid = gimid;
	}

	public String getImids() {
		return imids;
	}

	public void setImids(String imids) {
		this.imids = imids;
	}

	public String getGroupid() {
		return groupid;
	}

	public void setGroupid(String groupid) {
		this.groupid = groupid;
	}

	public String getPage() {
		return page;
	}

	public void setPage(String page) {
		this.page = page;
	}

	public String getPageSize() {
		return pageSize;
	}

	public void setPageSize(String pageSize) {
		this.pageSize = pageSize;
	}

	public String getUserId() {
		return userId;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}

	public String getFromUserId() {
		return fromUserId;
	}

	public void setFromUserId(String fromUserId) {
		this.fromUserId = fromUserId;
	}

	public String getToUserId() {
		return toUserId;
	}

	public void setToUserId(String toUserId) {
		this.toUserId = toUserId;
	}

	public String getFromUserImid() {
		return fromUserImid;
	}

	public void setFromUserImid(String fromUserImid) {
		this.fromUserImid = fromUserImid;
	}

	public String getToUserImid() {
		return toUserImid;
	}

	public void setToUserImid(String toUserImid) {
		this.toUserImid = toUserImid;
	}

	public String getState() {
		return state;
	}

	public void setState(String state) {
		this.state = state;
	}

	public String getNick() {
		return nick;
	}

	public void setNick(String nick) {
		this.nick = nick;
	}

	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public String getIsOwner() {
		return isOwner;
	}

	public void setIsOwner(String isOwner) {
		this.isOwner = isOwner;
	}
}
